﻿using UnityEngine;
using System.Collections;

namespace Battle
{

    public abstract class Behaviour :IBattleObject
    {
        protected Fsm fsm = null;
        protected Actor actor = null;

        public virtual void OnInit()
		{
			if(fsm!=null)
				fsm.OnInit();
		}

        public virtual void OnUpdate(float delta)
        {
            if(fsm!=null)
                fsm.Tick(delta);
        }

        public void Bind(Actor a, Fsm f)
        {
            actor = a;
            fsm = f;
        }
    }


}

